package com.hj.aiagent.core.flow;

import com.hj.aiagent.advisor.LoggerAdvisor;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.ai.tool.ToolCallback;
import org.springframework.stereotype.Component;

/**
 * 旅游规划智能体 - 规划并执行模式示例
 */
@Component
public class TravelPlanningAgent extends PlanningAgent {
    
    public TravelPlanningAgent(ToolCallback[] allTools, ChatModel dashscopeChatModel) {
        super(allTools);
        
        this.setName("TravelPlanningAgent");
        this.setMaxSteps(20);

        // 初始化 AI 对话客户端
        ChatClient chatClient = ChatClient.builder(dashscopeChatModel)
                .defaultAdvisors(new LoggerAdvisor())
                .build();
        this.setClient(chatClient);
    }
}
